package com.estar.integaration.Reader.Listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.estar.integaration.Util.Util;
import com.estar.integaration.entity.paymentPlanEntity.DueReceiptDetail;
import lombok.AllArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * Author: YJL
 * Date: 2022/2/17 16:44
 **/
@AllArgsConstructor
public class DueReceiptDetailListener extends AnalysisEventListener<DueReceiptDetail> {

  List<DueReceiptDetail> dueReceiptDetailList = new ArrayList<>();


  @Override
  public void invoke(DueReceiptDetail dueReceiptDetail, AnalysisContext analysisContext) {
    dueReceiptDetail.setId(Util.getUUID());
    dueReceiptDetailList.add(dueReceiptDetail);
  }

  @Override
  public void doAfterAllAnalysed(AnalysisContext analysisContext) {

  }
}
